﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="UPMLSchema" targetNamespace="http://schemas.microsoft.com/dsltools/UPML" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/UPML" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- DocumentTypePackage -->
  <xsd:element name="documentTypePackage" type="DocumentTypePackage" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentTypePackage">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: DocumentTypePackageHasDocumentTypes -->
          <xsd:element name="documentTypes" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of DocumentTypePackageHasDocumentTypes</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="documentTypePackageHasDocumentTypes">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from DocumentTypePackageHasDocumentTypes needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="documentType" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: DocumentTypePackageHasGenericProperties -->
          <xsd:element name="genericProperties" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of DocumentTypePackageHasGenericProperties</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="documentTypePackageHasGenericProperties" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of DocumentTypePackageHasGenericProperties needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypePackage Moniker -->
  <xsd:element name="documentTypePackageMoniker" type="DocumentTypePackageMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypePackageMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentTypePackage instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentType -->
  <xsd:element name="documentType" type="DocumentType" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentType">
    <xsd:annotation>
      <xsd:documentation>Elements embedded in the model. Appear as boxes on the diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: DocumentTypeReferencesChildren -->
          <xsd:element name="children" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of DocumentTypeReferencesChildren</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="documentTypeReferencesChildren">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from DocumentTypeReferencesChildren needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="documentTypeMoniker" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: DocumentTypeReferencesGenericProperties -->
          <xsd:element name="genericProperties" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of DocumentTypeReferencesGenericProperties</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="documentTypeReferencesGenericProperties" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of DocumentTypeReferencesGenericProperties needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" />
        <!-- Property: Alias -->
        <xsd:attribute name="alias" type="xsd:string" />
        <!-- Property: Description -->
        <xsd:attribute name="description" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentType Moniker -->
  <xsd:element name="documentTypeMoniker" type="DocumentTypeMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypeMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentType instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- GenericProperty -->
  <xsd:element name="genericProperty" type="GenericProperty" substitutionGroup="core:modelElement" />
  <xsd:complexType name="GenericProperty">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" />
        <!-- Property: Alias -->
        <xsd:attribute name="alias" type="xsd:string" />
        <!-- Property: PropertyType -->
        <xsd:attribute name="propertyType" type="GenericPropertyType" />
        <!-- Property: Mandatory -->
        <xsd:attribute name="mandatory" type="xsd:boolean" />
        <!-- Property: Validation -->
        <xsd:attribute name="validation" type="xsd:string" />
        <!-- Property: Description -->
        <xsd:attribute name="description" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- GenericProperty Moniker -->
  <xsd:element name="genericPropertyMoniker" type="GenericPropertyMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="GenericPropertyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for GenericProperty instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypePackageHasDocumentTypes -->
  <xsd:element name="documentTypePackageHasDocumentTypes" abstract="true" type="DocumentTypePackageHasDocumentTypes" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentTypePackageHasDocumentTypes" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Embedding relationship between the Model and Elements</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end DocumentType -->
          <xsd:element ref="documentType" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypePackageHasDocumentTypes Moniker -->
  <xsd:element name="documentTypePackageHasDocumentTypesMoniker" type="DocumentTypePackageHasDocumentTypesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypePackageHasDocumentTypesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentTypePackageHasDocumentTypes instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypeReferencesChildren -->
  <xsd:element name="documentTypeReferencesChildren" abstract="true" type="DocumentTypeReferencesChildren" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentTypeReferencesChildren" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Reference relationship between Elements.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end DocumentType -->
          <xsd:element ref="documentTypeMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypeReferencesChildren Moniker -->
  <xsd:element name="documentTypeReferencesChildrenMoniker" type="DocumentTypeReferencesChildrenMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypeReferencesChildrenMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentTypeReferencesChildren instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypePackageHasGenericProperties -->
  <xsd:element name="documentTypePackageHasGenericProperties" type="DocumentTypePackageHasGenericProperties" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentTypePackageHasGenericProperties">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end GenericProperty -->
          <xsd:element ref="genericProperty" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypePackageHasGenericProperties Moniker -->
  <xsd:element name="documentTypePackageHasGenericPropertiesMoniker" type="DocumentTypePackageHasGenericPropertiesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypePackageHasGenericPropertiesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentTypePackageHasGenericProperties instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypeReferencesGenericProperties -->
  <xsd:element name="documentTypeReferencesGenericProperties" type="DocumentTypeReferencesGenericProperties" substitutionGroup="core:modelElement" />
  <xsd:complexType name="DocumentTypeReferencesGenericProperties">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end GenericProperty -->
          <xsd:element ref="genericPropertyMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- DocumentTypeReferencesGenericProperties Moniker -->
  <xsd:element name="documentTypeReferencesGenericPropertiesMoniker" type="DocumentTypeReferencesGenericPropertiesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="DocumentTypeReferencesGenericPropertiesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for DocumentTypeReferencesGenericProperties instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Enum GenericPropertyType -->
  <xsd:simpleType name="GenericPropertyType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="ApprovedColor"/>
      <xsd:enumeration value="CheckboxList"/>
      <xsd:enumeration value="ContentPicker"/>
      <xsd:enumeration value="DatePickerWithTime"/>
      <xsd:enumeration value="DatePicker"/>
      <xsd:enumeration value="DropdownMultiple"/>
      <xsd:enumeration value="DropDown"/>
      <xsd:enumeration value="FolderBrowser"/>
      <xsd:enumeration value="ImageCropper"/>
      <xsd:enumeration value="Label"/>
      <xsd:enumeration value="MacroContainer"/>
      <xsd:enumeration value="MediaPicker"/>
      <xsd:enumeration value="MemberPicker"/>
      <xsd:enumeration value="Numeric"/>
      <xsd:enumeration value="Radiobox"/>
      <xsd:enumeration value="RelatedLinks"/>
      <xsd:enumeration value="RichTextEditor"/>
      <xsd:enumeration value="SimpleEditor"/>
      <xsd:enumeration value="Tags"/>
      <xsd:enumeration value="TextboxMultiple"/>
      <xsd:enumeration value="TextString"/>
      <xsd:enumeration value="Boolean"/>
      <xsd:enumeration value="UltimatePicker"/>
      <xsd:enumeration value="Upload"/>
    </xsd:restriction>
  </xsd:simpleType>
  
</xsd:schema>

